﻿namespace AE.Remoting
{
	/// <summary>
	/// Handler used for Web-based remoting
	/// </summary>
	/// <remarks></remarks>
	public class RemotingHandler : System.Web.IHttpHandler
	{
		public void ProcessRequest(System.Web.HttpContext context)
		{
			byte[] posted = context.Request.BinaryRead(context.Request.ContentLength);
			posted = Utilities.Execute(posted);
			context.Response.BinaryWrite(posted);
		}

		public bool IsReusable {
			get { return false; }
		}
	}
}
